package com.springsource.listadopersonas.domain;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.Size;
import java.util.Date;
import javax.validation.constraints.NotNull;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.annotation.DateTimeFormat;
import com.springsource.listadopersonas.domain.Persona;
import javax.persistence.ManyToOne;

@RooJavaBean
@RooToString
@RooEntity
public class Hijo {

    @Size(min = 3, max = 30)
    private String NombreHijo;

    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date FechaNacimiento;

    @ManyToOne
    private Persona padre;
}
